package com.example.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.blog.pojo.Blog;
import com.example.blog.pojo.Result;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;
import java.util.Map;

public interface BlogService extends IService<Blog> {
    Result<T> saveBlog(Blog blog, String label, String token);

    Result<Blog> getById(int id);

    Result<Map<String,Object>> showBlog(int pageNum, int pageSize);

    Result<List<Blog>> getAllBlog();

    Result<List<Blog>> getUserBlog(String token);

    Result<Map<String, Object>> getBlogByLabel(String label,int pageNum, int pageSize);

    Result<T> deleteBlogRecord(int id, String token);


    Result<List<Blog>> getBlogsByAuthor(String username);

    Result<Map<String, Object>> getByKeyword(String keyword,int pageNum, int pageSize);

    Result<T> likeBlogs(int id, String token);

    Result<T> CollectBlog(int blogId,String token);
}
